<?php
require_once('config.php');

$id=$_GET['id'];
$telephone=$_GET['telephone'];
$password=$_GET['password'];

$sql="update userinfo set telephone='$telephone',password='$password' where id='$id'";

mysqli_query($conn,$sql);

$cont=mysqli_affected_rows($conn);


$obj=array();

if($cont>0){
    $obj['code']=1;
    $obj['msg']='资料修改成功';
    $obj['data']=true;

}else{
    $obj['code']=0;
    $obj['msg']='资料修改失败';
}
echo json_encode($obj);